package net.wsfcp.android.bean.resultbean.enumInterface;

import android.support.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

//代替枚举的枚举注解
public interface PayType {
    //  0:微信 1:支付宝 2:银联 3:苹果IAP 4=货到付款
    int TYPE_WEIXINPAY = 0;
    int TYPE_ALIPAY = 1;
    int TYPE_UNIONPAY = 2;
    int TYPE_IAP = 3;
    int TYPE_CASH = 4;

    //Retention 是元注解，简单地讲就是系统提供的，用于定义注解的“注解”
    @Retention(RetentionPolicy.SOURCE)
    //这里指定int的取值只能是以下范围
    @IntDef({TYPE_WEIXINPAY, TYPE_ALIPAY, TYPE_UNIONPAY, TYPE_IAP, TYPE_CASH})
    @interface Type {
    }
}
